/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.repair.service;

import org.springblade.modules.repair.dto.SaveElevatorStructureRelationDTO;
import org.springblade.modules.repair.entity.ElevatorPartsStructureTemplateRelation;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.repair.vo.ElevatorSimpleInfoVO;

import java.util.List;

/**
 * 电梯配件结构模板关联 服务类
 *
 * @author ysq
 * @since 2024-09-04
 */
public interface IElevatorPartsStructureTemplateRelationService extends BaseService<ElevatorPartsStructureTemplateRelation> {

	/**
	 * 添加或编辑
	 * @param elevatorPartsStructureTemplateRelation
	 * @return
	 */
	boolean customSaveOrEdit(ElevatorPartsStructureTemplateRelation elevatorPartsStructureTemplateRelation);

	/**
	 * 根据电梯id查询
	 * @param elevatorId
	 * @return
	 */
	ElevatorPartsStructureTemplateRelation getByElevatorId(Long elevatorId);

	/**
	 * 获取允许关联电梯列表
	 * @param elevatorId
	 * @return
	 */
	List<ElevatorSimpleInfoVO> getAllowRelationElevatorList(Long elevatorId);

	/**
	 * 关联电梯到结构模板
	 * @param param
	 * @return
	 */
	boolean relationToStructureTemplate(SaveElevatorStructureRelationDTO param);

	/**
	 * 统计同一个项目下，使用相同结构模板的电梯数量
	 * @param elevatorId
	 * @return
	 */
	Long getSameStructureCount(Long elevatorId);
}
